import request from '@/config/axios'

// PI 巡查巡检意见反馈 VO
export interface MessageBoardVO {
  id: number // 编号
  content: string // 内容
}

// PI 巡查巡检意见反馈 API
export const MessageBoardApi = {
  // 查询PI 巡查巡检意见反馈分页
  getMessageBoardPage: async (params: any) => {
    return await request.get({ url: `/pi/message-board/page`, params })
  },

  // 查询PI 巡查巡检意见反馈详情
  getMessageBoard: async (id: number) => {
    return await request.get({ url: `/pi/message-board/get?id=` + id })
  },

  // 新增PI 巡查巡检意见反馈
  createMessageBoard: async (data: MessageBoardVO) => {
    return await request.post({ url: `/pi/message-board/create`, data })
  },

  // 修改PI 巡查巡检意见反馈
  updateMessageBoard: async (data: MessageBoardVO) => {
    return await request.put({ url: `/pi/message-board/update`, data })
  },

  // 删除PI 巡查巡检意见反馈
  deleteMessageBoard: async (id: number) => {
    return await request.delete({ url: `/pi/message-board/delete?id=` + id })
  },

  // 导出PI 巡查巡检意见反馈 Excel
  exportMessageBoard: async (params) => {
    return await request.download({ url: `/pi/message-board/export-excel`, params })
  },
}